/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vn.com.aptech.msh.utils;

import javax.inject.Inject;
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Web application lifecycle listener.
 * @author trietto
 */
@WebListener()
public class MSHServletListener implements HttpSessionListener {

    @Inject
    ApplicationAttributes applicationAttributes;

    @Override
    public void sessionCreated(HttpSessionEvent se) {
        applicationAttributes.incViews();
    }

    @Override
    public void sessionDestroyed(HttpSessionEvent se) {
    }
}
